import 'dart:io';
import 'dart:convert';

///// wfz6nudxrykd7wjoh5u7bcovt77xhduaekgme44dy6vrz2bjsckq
void main(List<String> args) {
  ServerSocket.bind('127.0.0.1', 8009).then((value) {
    print('start to listen:$value');
    value.listen((event) {
      print(event.remoteAddress);
      print(event.length);
      event.transform(utf8).listen(print);

      print(event.remoteAddress);
      event.close();
      value.close();
    });

    Socket.connect('127.0.0.1', 8009).then((value) {
      print(value.runtimeType);
      value.write('hello zhouyu');
    });
  });
}
